#ifndef __FUPDATE_H_
#define __FUPDATE_H_

#include "fboot.h"
#if (FBOOT_USING_FUPDATE == 1)

#if (FUPDATE_USING_AES256 == 1)

uint8_t *fupdate_aes256_iv_get(void);
uint8_t *fupdate_aes256_key_get(void);

int fupdate_aes256_update(const char *aes_iv, const char *aes_key);

#endif

#define FUPDATE_MODE_SRC_FAL    0x0001
#define FUPDATE_MODE_SRC_FS     0x0002

#define FUPDATE_MODE_DEST_FAL   0x0100
#define FUPDATE_MODE_DEST_FS    0x0200


int fupdate_rblunpack(const char* src_name, const char* dest_name, uint32_t flags , uint32_t mode );
int fupdate_rblcheck(const char* src_name, uint32_t mode);
int fupdate_rblprobe(const char* src_name, uint32_t mode);



#define FUPDATE_FLAGS_CHECK_VERSION  0x0001U

int fupdate_falprobe(const char* fal_part_name);

int fupdate_falcheck(const char* fal_part_name);

int fupdate_fal2fal(const char* fal_part_name, const char* fal_part_name_dest, uint32_t flags );

#if (FBOOT_USING_FILESYSTEM == 1)	

int fupdate_fal2fs(const char* fal_part_name, const char* fs_file_path_dest, uint32_t flags );


int fupdate_fsprobe(const char* fal_part_name);

int fupdate_fscheck(const char* fal_part_name);

int fupdate_fs2fs(const char* fs_file_path, const char* fs_file_path_dest, uint32_t flags );

int fupdate_fs2fal(const char* fs_file_path, const char* fal_part_name_dest, uint32_t flags );

#endif

#include "rbl_unpack.h"

#endif /* FBOOT_USING_FUPDATE */

#endif

